import React, { memo } from "react";
import { useSelector, shallowEqual } from "react-redux";
import { Redirect ,Route} from "react-router-dom";

/* export default memo(function Private(props) {
  const { token } = useSelector(
    (state) => ({
      token: state.getIn(["user", "token"]),
    }),
    shallowEqual
  );
  return token ? <Route {...props}/> :<Redirect to={{ pathname: "/login"}} state={props.location.pathname} />
}); */

